<?php include 'product_list_css_js.php'; ?>

<center>
    <div class="div_content_all">
        <?php include 'top_menu2.php'; ?>
        <div class="clear">
        </div>
        <div id="breadcrumb">
            <div class="clear">

            </div>
        </div>

        <div id="content">
            <div id="left-col">
                <div id="bycategory">
                    <div class="borleft">
                        <div class="bortop png"></div>
                        <div class="borright">
                            <div class="content">
                                <div class="productlist">
                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                        <tr>
                                            <td>
                                                    <div id="">
                                                        <div class="listtitle" style="font-size: 15px">
                                                            <div class="left">
                                                                <h1>
                                                                    <?php if(is_array($categoryParent)){?>
                                                                    <?php foreach ($categoryParent as $key => $value) {?>
                                                                        <?php if($key > 0){?>
                                                                                <span> &gt; </span>
                                                                        <?php } ?>
                                                                                <a href="<?php echo $root_page;?>/danhmuc/<?php echo $value['category_id'];?>/<?php echo $value['category_name_filter'];?>.html" title="<?php echo $value['category_name'];?>"><?php echo $value['category_name'];?></a>
                                                                        <?php } ?>
                                                                        <span> &gt; </span>
                                                                    <?php }?>
                                                                <?php echo $productTitle; ?>
                                                                </h1>
                                                            </div>
                                                        <div class="clear"></div>
                                                    </div>

                                                    <div class="list">
                                                        <table cellspacing="0" cellpadding="0" border="0" id="ctl00_cphLeft_ByCategory1_rptRange_ctl00_ProductList1_dtlProduct">
                                                            <tbody>
                                                                <tr>
                                                                    <?php if (is_array($aryProduct)) {
 ?>
                                                                    <?php $i = 1;
                                                                        foreach ($aryProduct as $key => $product) { ?>
                                                                            <td valign="bottom">
                                                                            	
                                                                                <div class="item">

                                                                            <?php
                                                                            $productHiglight = str_replace("\n", '<br>', $product['product_highlight']);
                                                                            $productHiglight = str_replace("\r", '<br>', $productHiglight);
                                                                            $productHiglight = str_replace("\"", '', $productHiglight);

                                                                            $product_promotional = str_replace("\n", '<br>', $product['product_promotional']);
                                                                            $product_promotional = str_replace("\r", '<br>', $product_promotional);
                                                                            $product_promotional = str_replace("\"", '', $product_promotional);
                                                                            ?>

                                                                            <div class="hoverborder"  onmouseout='UnTip()' onmouseover="Tip('<div class=\'div_tootip_content\'><div class=\'div_ttp_title\'><?php echo $product['product_title']; ?> - <span class=\'ttp_price\'> <?php echo number_format($product['product_price_vnd'], 0, ',', '.'); ?>&nbsp;VNĐ</span></div><div class=\'div_ttp_pro_title\'>Khuyến mãi dành cho sản phẩm</div><div class=\'div_ttp_pro_content\'><?php echo $product_promotional;?></div><div class=\'div_fun_title\'>Tính năng nổi bật</div><div class=\'div_fun_content\'><?php echo $productHiglight; ?> </div></div>', WIDTH, 300, ABOVE, true)" >
                                                                                <a href="<?php echo $root_page?>/sanpham/<?php echo $product['product_id']; ?>/<?php echo $product['product_title_filter']; ?>.html" title="<?php echo $product['product_title']; ?>">
                                                                                    <?php if($product_type == 1) {?>
                                                                                        <div class="image_empty">&nbsp;</div>
                                                                                    <?php } ?>
                                                                                    <?php if($product_type == 2) {?>
                                                                                        <div class="image_event">&nbsp;</div>
                                                                                    <?php } ?>
                                                                                        <?php if($product_type == 3) {?>
                                                                                        <div class="image_hot">&nbsp;</div>
                                                                                    <?php } ?>
                                                                                    <div class="image">
                                                                                        <div class="divvalign">
                                                                                            <div class="divvalign2">
                                                                                                <img src="<?php echo $sub_domain;?>/images/upload/thumbnail/<?php echo $product['product_main_image']; ?>" alt="<?php echo $product['product_title']; ?>" title="<?php echo $product['product_title']; ?>">
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </a>
                                                                                <div class='name'>
                                                                                    <a>
<?php echo $product['product_title']; ?>
                                                                                    </a>
                                                                                </div>
                                                                                <?php if($product['product_price_vnd_km'] != 0 && $product['product_price_active_km'] == 1){?>
                                                                                <div style="text-decoration: line-through;">
                                                                                    <?php echo number_format($product['product_price_vnd_km'], 0, ',', '.').'&nbsp;VNĐ';?>
                                                                                </div>
                                                                                <div class="price">
                                                                                    <?php echo number_format($product['product_price_vnd'], 0, ',', '.').'&nbsp;VNĐ'?>
                                                                                </div>
                                                                                <?php }else{ ?>
                                                                                <div class="price">
<?php echo ($product['product_price_vnd'] != 0) ? number_format($product['product_price_vnd'], 0, ',', '.').'&nbsp;VNĐ' : '<a onclick="MyController.OverlayChat();" style="color: red;">Call</a>'; ?>
                                                                                   
                                                                                </div>
                                                                                <?php } ?>
                                                                                
                                                                            </div>
                                                                        </div>
                                                                    </td>
<?php if ($i % 5 == 0) { ?>
                                                                            </tr><tr>
                                                                    <?php } ?>
                                                                    <?php $i++;
                                                                        } ?>
<?php } ?>

                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                    <?php echo $strPaging;?>
                                                </div>


                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="borbottom png"></div>
                </div>
            </div>
            <div id="right-col">
                <?php include 'product_right_item_top.php'; ?>
                <?php include 'product_right_support.php'; ?>
                <?php include 'product_right_item_top_2.php'; ?>
            <div class="clear"></div>
                                            </div>
                                        </div>
                                    </div>

                                </center>
                                <div class="clear"></div>
<?php include 'home_footer.php'; ?>
<?php include 'overlay_chat.php';?>